From: Vincent Untz Date: Wed, 5 Jan 2011 09:32:44 +0000 (+0100) Subject: gnome-shell.in: Really never add empty elements to LD_LIBRARY_PATH X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9331 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7beb7e0f65c6f66daebd307c492381249ddd41be;p=gnome-shell.git gnome-shell.in: Really never add empty elements to LD_LIBRARY_PATH This complements the fix from c6eb2761, to make sure that we don't use the pre-existing $LD_LIBRARY_PATH if it's set but empty. Both commits fix CVE-2010-4000. https://bugzilla.gnome.org/show_bug.cgi?id=638728 --- diff --git a/src/gnome-shell.in b/src/gnome-shell.in index 2abd7d5cc..e422adb8d 100755 --- a/src/gnome-shell.in +++ b/src/gnome-shell.in @@ -152,7 +152,7 @@ def start_dconf_await_service(): # dconf is linked without libtool, so unlike other GNOME modules, # won't have an embedded rpath for its library directory. env = dict(os.environ) - if 'LD_LIBRARY_PATH' in env: + if 'LD_LIBRARY_PATH' in env and env['LD_LIBRARY_PATH']: ld_library_path = '@libdir@:' + env['LD_LIBRARY_PATH'] else: ld_library_path = '@libdir@' @@ -246,7 +246,7 @@ def start_shell(perf_output=None): if pkgconfig.returncode == 0: mozjs_libdir = re.sub('-(sdk|devel)', '', mozjs_sdkdir) if os.path.exists(mozjs_libdir + '/libmozjs.so'): - if 'LD_LIBRARY_PATH' in env: + if 'LD_LIBRARY_PATH' in env and env['LD_LIBRARY_PATH']: ld_library_path = env['LD_LIBRARY_PATH'] + ':' + mozjs_libdir else: ld_library_path = mozjs_libdir